package com.hongye.consult.service.impl;

import com.hongye.common.security.utils.SecurityUtils;
import com.hongye.consult.domain.TxUserRelation;
import com.hongye.consult.mapper.TxMessageMapper;
import com.hongye.consult.mapper.TxUserMessageStatusMapper;
import com.hongye.consult.mapper.TxUserRelationMapper;
import com.hongye.consult.service.ConsultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.security.Security;
import java.util.List;

/**
 * @BelongsProject: hongye-house-cloud
 * @BelongsPackage: com.hongye.consult.service.impl
 * @Author: songYuHang
 * @CreateTime: 2025-02-13  19:48
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class ConsultServiceImpl implements ConsultService {

    @Autowired
    private TxMessageMapper messageMapper;

    @Autowired
    private TxUserMessageStatusMapper userMessageStatusMapper;

    @Autowired
    private TxUserRelationMapper userRelationMapper;


    @Override
    public List<TxUserRelation> friendList() {
        //获取当前用户id
        Long userId = SecurityUtils.getUserId();

        return userRelationMapper.selectFriendList(userId);
    }
}
